package cn.bdqn.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import cn.bdqn.entity.User;
import cn.bdqn.service.UserService;

@Controller
@RequestMapping
public class UserController {
	
	@Autowired
	private UserService userService;
	
	
	@RequestMapping("/disLogin")
	public ModelAndView disLogin(){
		User user = userService.findUserById(1);
		ModelAndView mv = new ModelAndView();
		mv.setViewName("login");
		mv.addObject("loginUser", user);
		return mv;
	}
	
}
